home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / include / incl98.zoo / gemfast.h < prev    next >
C/C++ Source or Header  |  1993-07-10  |  15KB  |  591 lines

  1. #ifndef _GEMFAST_H
  2. #define _GEMFAST_H
  3.  
  4. #ifndef _COMPILER_H
  5. # include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. /**************************************************************************
  13.  *
  14.  * GEMFAST.H - Header file for common VDI and AES symbols.    
  15.  *
  16.  *  This header file contains items compatible with both GEMDEFS and OBDEFS
  17.  *  from the Alcyon system.  Note that there are no 'extern' definitions
  18.  *  for the functions, because they all return a signed short and work
  19.  *  fine as autodefined functions.
  20.  *
  21.  *  If you have a lot of source already coded for #include <gemdefs.h>,
  22.  *  you can continue to use your original gemdefs file, or you can rename
  23.  *  this file to gemdefs.h; if your source also includes obdefs.h, remove
  24.  *  them when using this file.
  25.  *  (i have links called obdefs and gemdefs, since this file is now protected
  26.  *   against multiple inclusions -- ++jrb)
  27.  *
  28.  * Credits dept:
  29.  *    This file bears an amazing similarity to the original Alcyon GEMDEFS
  30.  *    and OBDEFS header files, which are copyrighted by Atari.  What can I
  31.  *    say?  Copyrighted or not, these are the names and values that every-
  32.  *    body uses, so of course the files look *awful* similar...
  33.  *
  34.  *************************************************************************/
  35.  
  36.         /* evnt_multi flags */
  37. #define MU_KEYBD    0x0001
  38. #define MU_BUTTON    0x0002
  39. #define MU_M1        0x0004
  40. #define MU_M2        0x0008
  41. #define MU_MESAG    0x0010
  42. #define MU_TIMER    0x0020
  43.         /* keyboard states */
  44. #define K_RSHIFT    0x0001
  45. #define K_LSHIFT    0x0002
  46. #define K_CTRL         0x0004
  47. #define K_ALT        0x0008
  48.         /* event message values */
  49. #define MN_SELECTED    10
  50. #define WM_REDRAW    20
  51. #define WM_TOPPED    21
  52. #define WM_CLOSED    22
  53. #define WM_FULLED    23
  54. #define WM_ARROWED    24
  55. #define WM_HSLID    25
  56. #define WM_VSLID    26
  57. #define WM_SIZED    27
  58. #define WM_MOVED    28
  59. #define WM_NEWTOP    29
  60. #define AC_OPEN        40
  61. #define AC_CLOSE    41
  62.         /* Xcontrol messages */
  63. #define CT_UPDATE    50
  64. #define CT_MOVE        51
  65. #define CT_NEWTOP    52
  66. #define CT_KEY        53
  67.  
  68.         /* form_dial opcodes */
  69. #define FMD_START    0
  70. #define FMD_GROW    1
  71. #define FMD_SHRINK    2
  72. #define FMD_FINISH    3
  73.         /* rsrc_gaddr structure types */
  74. #define R_TREE         0 
  75. #define R_OBJECT    1
  76. #define R_TEDINFO    2
  77. #define R_ICONBLK    3
  78. #define R_BITBLK    4
  79. #define R_STRING    5
  80. #define R_IMAGEDATA 6
  81. #define R_OBSPEC    7
  82. #define R_TEPTEXT    8
  83. #define R_TEPTMPLT    9
  84. #define R_TEPVALID    10
  85. #define R_IBPMASK    11 
  86. #define R_IBPDATA    12    
  87. #define R_IBPTEXT    13
  88. #define R_BIPDATA    14
  89. #define R_FRSTR        15
  90. #define R_FRIMG        16 
  91.         /* Window Attributes */
  92. #define NAME        0x0001
  93. #define CLOSER         0x0002
  94. #define FULLER         0x0004
  95. #define MOVER        0x0008
  96. #define INFO        0x0010
  97. #define SIZER        0x0020
  98. #define UPARROW        0x0040
  99. #define DNARROW        0x0080
  100. #define VSLIDE         0x0100
  101. #define LFARROW        0x0200
  102. #define RTARROW        0x0400
  103. #define HSLIDE         0x0800
  104.         /* wind_create flags */
  105. #define WC_BORDER    0
  106. #define WC_WORK        1
  107.         /* wind_get flags */
  108. #define WF_KIND         1
  109. #define WF_NAME         2
  110. #define WF_INFO         3
  111. #define WF_WORKXYWH      4
  112. #define WF_CURRXYWH     5
  113. #define WF_PREVXYWH      6
  114. #define WF_FULLXYWH      7
  115. #define WF_HSLIDE    8
  116. #define WF_VSLIDE    9
  117. #define WF_TOP          10
  118. #define WF_FIRSTXYWH     11
  119. #define WF_NEXTXYWH      12
  120. #define WF_RESVD    13
  121. #define WF_NEWDESK    14
  122. #define WF_HSLSIZE    15
  123. #define WF_VSLSIZE    16
  124. #define WF_SCREEN    17
  125. #define WF_COLOR    18
  126. #define WF_DCOLOR    19
  127.         /* window elements    */
  128. #define W_BOX        0
  129. #define W_TITLE        1
  130. #define W_CLOSER    2
  131. #define W_NAME        3
  132. #define W_FULLER    4
  133. #define W_INFO        5
  134. #define W_DATA        6
  135. #define W_WORK        7
  136. #define W_SIZER        8
  137. #define W_VBAR        9
  138. #define W_UPARROW    10
  139. #define W_DNARROW    11
  140. #define W_VSLIDE    12
  141. #define W_VELEV        13
  142. #define W_HBAR        14
  143. #define W_LFARROW    15
  144. #define W_RTARROW    16
  145. #define W_HSLIDE    17
  146. #define W_HELEV        18
  147.         /* arrow message    */
  148. #define WA_UPPAGE     0
  149. #define WA_DNPAGE     1
  150. #define WA_UPLINE     2
  151. #define WA_DNLINE     3
  152. #define WA_LFPAGE     4
  153. #define WA_RTPAGE     5
  154. #define WA_LFLINE     6
  155. #define WA_RTLINE     7
  156.  
  157.         /* wind_update flags */
  158. #define END_UPDATE    0
  159. #define BEG_UPDATE    1
  160. #define END_MCTRL    2
  161. #define BEG_MCTRL    3
  162.         /* graf_mouse mouse types*/
  163. #define ARROW        0
  164. #define BEE        2
  165. #define BUSY_BEE    BEE        /* alias */
  166. #define TEXT_CRSR    1
  167. #define HOURGLASS    2
  168. #define POINT_HAND    3
  169. #define FLAT_HAND    4
  170. #define THIN_CROSS    5
  171. #define THICK_CROSS    6
  172. #define OUTLN_CROSS     7
  173. #define USER_DEF    255
  174. #define M_OFF        256
  175. #define M_ON        257
  176.         /* objects - general */
  177. #define ROOT 0                /* index of ROOT            */
  178. #define MAX_LEN     81        /* max string length        */
  179. #define MAX_DEPTH    8        /* max depth of search or draw  */
  180.         /* inside fill patterns    */
  181. #define IP_HOLLOW    0
  182. #define IP_1PATT    1
  183. #define IP_2PATT    2
  184. #define IP_3PATT    3
  185. #define IP_4PATT    4
  186. #define IP_5PATT    5
  187. #define IP_6PATT    6
  188. #define IP_SOLID    7
  189.         /* normal graphics drawing modes */
  190. #define MD_REPLACE    1
  191. #define MD_TRANS    2
  192. #define MD_XOR         3
  193. #define MD_ERASE    4
  194.  
  195.         /* bit blt rules */
  196. #define ALL_WHITE    0
  197. #define S_AND_D        1
  198. #define S_AND_NOTD    2
  199. #define S_ONLY         3
  200. #define NOTS_AND_D    4
  201. #define D_ONLY         5
  202. #define S_XOR_D        6
  203. #define S_OR_D         7
  204. #define NOT_SORD    8
  205. #define NOT_SXORD    9
  206. #define D_INVERT    10
  207. #define NOT_D        10
  208. #define S_OR_NOTD    11
  209. #define NOT_S        12
  210. #define NOTS_OR_D    13
  211. #define NOT_SANDD    14
  212. #define ALL_BLACK    15
  213.  
  214.         /* font types */
  215. #define IBM 3
  216. #define SMALL 5
  217.  
  218.         /* object types */
  219. #define G_BOX        20
  220. #define G_TEXT         21
  221. #define G_BOXTEXT    22
  222. #define G_IMAGE        23
  223. #define G_USERDEF    24
  224. #define G_IBOX         25
  225. #define G_BUTTON    26
  226. #define G_BOXCHAR    27
  227. #define G_STRING    28
  228. #define G_FTEXT        29
  229. #define G_FBOXTEXT    30
  230. #define G_ICON         31
  231. #define G_TITLE        32
  232.         /* object flags */
  233. #define NONE        0x0000
  234. #define SELECTABLE    0x0001
  235. #define DEFAULT        0x0002
  236. #define EXIT        0x0004
  237. #define EDITABLE    0x0008
  238. #define RBUTTON        0x0010
  239. #define LASTOB         0x0020
  240. #define TOUCHEXIT    0x0040
  241. #define HIDETREE    0x0080
  242. #define INDIRECT    0x0100
  243. #define SUBMENU         0x0800          /* falcon aes hierarchical menus */
  244.         /* Object states */
  245. #define NORMAL         0x0000
  246. #define SELECTED    0x0001
  247. #define CROSSED        0x0002
  248. #define CHECKED        0x0004
  249. #define DISABLED    0x0008
  250. #define OUTLINED    0x0010
  251. #define SHADOWED    0x0020
  252. #define WHITEBAK    0x0080
  253.         /* Object colors - default pall. */
  254. #define WHITE    0
  255. #define BLACK    1
  256. #define RED      2
  257. #define GREEN    3
  258. #define BLUE     4
  259. #define CYAN     5
  260. #define YELLOW   6
  261. #define MAGENTA  7
  262. #define LWHITE   8
  263. #define LBLACK   9
  264. #define LRED     10
  265. #define LGREEN   11
  266. #define LBLUE    12
  267. #define LCYAN    13
  268. #define LYELLOW  14
  269. #define LMAGENTA 15
  270.         /* editable text field definitions */
  271. #define EDSTART        0
  272. #define EDINIT         1
  273. #define EDCHAR         2
  274. #define EDEND        3
  275.         /* editable text justification */
  276. #define TE_LEFT        0
  277. #define TE_RIGHT    1
  278. #define TE_CNTR        2
  279.  
  280.         /* file attr for dos_create    */
  281. #define    F_ATTR        0    
  282.  
  283.         /* VDI Memory Form Definition Block */
  284.  
  285. #ifndef __MFDB__
  286. #ifndef _ALT_MFDB
  287. #ifndef __ALT_MFDB__
  288.  
  289. #define __MFDB__
  290.  
  291. typedef struct
  292. {
  293. #ifdef __TCC_COMPAT__
  294.     void        *fd_addr;
  295. #else /* !__TCC_COMPAT__ */
  296.     long        fd_addr;    /* Addrerss of upper left corner of first*/
  297.                                     /* plane of raster area. If NULL then   */
  298.                                     /* MFDB is for a physical device        */
  299. #endif /* !__TCC_COMPAT__ */
  300.     short        fd_w;        /* Form Width in Pixels                 */
  301.     short        fd_h;       /* Form Height in Pixels                */
  302.     short        fd_wdwidth; /* Form Width in shorts(fd_w/sizeof(int)*/
  303.     short        fd_stand;   /* Form format 0= device spec 1=standard*/
  304.     short        fd_nplanes; /* Number of memory planes              */
  305.     short        fd_r1;      /* Reserved                             */
  306.     short        fd_r2;      /* Reserved                             */
  307.     short        fd_r3;      /* Reserved                             */
  308. } MFDB;
  309. #endif
  310. #endif
  311. #endif    /* __MFDB__ */
  312.  
  313. #ifdef __ALT_MFDB__
  314. /* some software seems to wants this format for FDB. to get it, define
  315.    __ALT_MFDB__
  316.  */
  317. #ifdef __MFDB__
  318. # error conflicting types for MFDB
  319. #endif
  320.  
  321. #define __MFDB__
  322. typedef struct
  323. {
  324.     long    mp;
  325.     short    fwp;
  326.     short    fh;
  327.     short    fww;
  328.     short    ff;
  329.     short    np;
  330.     short    r1;
  331.     short    r2;
  332.     short    r3;
  333. } MFDB;
  334. #endif /* __ALT_MFDB__ */
  335.  
  336.         /* Mouse Form Definition Block */
  337. typedef struct mouse_form
  338.     {
  339.     short    mf_xhot;
  340.     short     mf_yhot;
  341.     short     mf_nplanes;
  342.     short    mf_bg;
  343.     short     mf_fg;
  344.     short     mf_mask[16];
  345.     short     mf_data[16];
  346.     } MFORM ;
  347.  
  348. typedef struct mouse_event_type
  349.     {
  350.     int    *x;
  351.